package org.smart4j.chapter1.proxy.staticproxy.demo;

/**
 * @ClassName:
 * @Description:
 * @Author: LynnZou
 * @Date: 2017/5/27
 */
public class HelloProxy implements Hello {

    private Hello hello;

    public HelloProxy() {
        hello = new HelloImpl();
    }

    @Override
    public void say(String name) {
        before();
        hello.say(name);
        after();
    }

    private void before(){
        System.out.println("Before");
    }

    private void after(){
        System.out.println("After");
    }


}
